const Rx = require('rxjs');
const {take, map} = require('rxjs/operators');
var timer1 = Rx.interval(1000).pipe(take(10)).pipe(map(count => {
  // console.log('----', count);
  return count + 100;
}));
var timer2 = Rx.interval(2000).pipe(take(6));
var timer3 = Rx.interval(500).pipe(take(10));
var concurrent = 2; // the argument
var merged = Rx.merge(timer1, timer2, timer3, concurrent);
merged.subscribe(x => console.log(x));
